import BasicLayout from "@/layouts/basic-layout";

let meta = {
  auth: true,
};

let routes = [
  {
    path: "/",
    name: "home",
    redirect: {
      name: `homepage`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/home",
        name: `homepage`,
        meta: {
          ...meta,
          title: "首页",
          closable: false,
        },
        component: () => import("@/pages/home"),
      },
    ],
  },
  {
    path: "/",
    name: "enterpriseInforManage",
    redirect: {
      name: `enterpriseInforInquiry`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/enterpriseInforInquiry",
        name: `enterpriseInforInquiry`,
        meta: {
          ...meta,
          title: "企业信息查询",
          closable: true,
        },
        component: () =>
          import("@/pages/enterpriseInforManage/enterpriseInforInquiry/index"),
      },
      {
        path: "/enterpriseInforExamine",
        name: `enterpriseInforExamine`,
        meta: {
          ...meta,
          title: "企业信息审核",
          closable: true,
        },
        component: () =>
          import("@/pages/enterpriseInforManage/enterpriseInforExamine/index"),
      },
      {
        path: "/recordInforInquiry",
        name: `recordInforInquiry`,
        meta: {
          ...meta,
          title: "备案项目查询",
          closable: true,
        },
        component: () =>
          import("@/pages/enterpriseInforManage/recordInforInquiry/index"),
      },
      {
        path: "/sharingRuleAudit",
        name: `sharingRuleAudit`,
        meta: {
          ...meta,
          title: "企业收益规则审核",
          closable: true,
        },
        component: () =>
          import("@/pages/enterpriseInforManage/sharingRuleAudit/index"),
      },
    ],
  },
  {
    path: "/",
    name: "userOrganizationManage",
    redirect: {
      name: `userOrganizationManage`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/enterpriseUsers",
        name: `enterpriseUsers`,
        meta: {
          ...meta,
          title: "企业用户",
          closable: true,
        },
        component: () =>
          import("@/pages/userOrganizationManage/enterpriseUsers"),
      },
    ],
  },
  {
    path: "/",
    name: "businessInformationManage",
    redirect: {
      name: `businessInformationManage`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/businessInformationManage",
        name: `businessInformationManage`,
        meta: {
          ...meta,
          title: "经营信息管理",
          closable: true,
        },
        component: () => import("@/pages/businessInformationManage/index"),
      },
      {
        path: "/businessInformationDetails",
        name: `businessInformationDetails`,
        meta: {
          ...meta,
          title: "经营信息详情",
          closable: true,
        },
        component: () =>
          import(
            "@/pages/businessInformationManage/businessInformationDetails"
          ),
      },
      {
        path: "/businessInfoHistory",
        name: `businessInfoHistory`,
        meta: {
          ...meta,
          title: "变更历史记录",
          closable: true,
        },
        component: () =>
          import("@/pages/businessInformationManage/businessInfoHistory"),
      },
    ],
  },
  {
    path: "/",
    name: "dataCapture",
    redirect: {
      name: `dataCapture`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/dataCapture",
        name: `dataCapture`,
        meta: {
          ...meta,
          title: "大数据采集",
          closable: true,
        },
        component: () => import("@/pages/dataCapture/index"),
      },
      {
        path: "/dataCaptureAdd",
        name: `dataCaptureAdd`,
        meta: {
          ...meta,
          title: "发布经营信息",
          closable: true,
        },
        component: () => import("@/pages/dataCapture/dataCaptureAdd"),
      },
      {
        path: "/dataCaptureDetails",
        name: `dataCaptureDetails`,
        meta: {
          ...meta,
          title: "建设库详情",
          closable: true,
        },
        component: () => import("@/pages/dataCapture/dataCaptureDetails"),
      },
    ],
  },
  {
    path: "/",
    name: "businessInformationTracking",
    redirect: {
      name: `businessInformationTracking`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/businessInformationMap",
        name: `businessInformationMap`,
        meta: {
          ...meta,
          title: "经营信息一张图",
          closable: true,
          cache: true,
        },
        component: () =>
          import("@/pages/businessInformationTracking/businessInformationMap"),
      },
      {
        path: "/businessInformationWarning",
        name: `businessInformationWarning`,
        meta: {
          ...meta,
          title: "经营信息预警查询",
          closable: true,
        },
        component: () =>
          import(
            "@/pages/businessInformationTracking/businessInformationWarning"
          ),
      },
      // {
      //   path: "/businessInfoWarningDetails",
      //   name: `businessInfoWarningDetails`,
      //   meta: {
      //     ...meta,
      //     title: "经营信息预警详情",
      //     closable: true,
      //   },
      //   component: () =>
      //     import(
      //       "@/pages/businessInformationTracking/businessInformationWarning/businessInfoWarningDetails"
      //     ),
      // },
    ],
  },
  {
    path: "/",
    name: "systemManage",
    redirect: {
      name: `systemManage`,
    },
    meta,
    component: BasicLayout,
    children: [
      {
        path: "/menuManage",
        name: `menuManage`,
        meta: {
          ...meta,
          title: "菜单管理",
          closable: true,
        },
        component: () => import("@/pages/systemManage/menuManage"),
      },
      {
        path: "/permissionManage",
        name: `permissionManage`,
        meta: {
          ...meta,
          title: "权限管理",
          closable: true,
        },
        component: () => import("@/pages/systemManage/permissionManage"),
      },
      {
        path: "/roleManage",
        name: `roleManage`,
        meta: {
          ...meta,
          title: "组织管理",
          closable: true,
        },
        component: () => import("@/pages/systemManage/roleManage"),
      },
      {
        path: "/dictionaryManage",
        name: `dictionaryManage`,
        meta: {
          ...meta,
          title: "字典管理",
          closable: true,
        },
        component: () => import("@/pages/systemManage/dictionaryManage"),
      },
      {
        path: "/warningTimeSet",
        name: `warningTimeSet`,
        meta: {
          ...meta,
          title: "预警时间设置",
          closable: true,
        },
        component: () => import("@/pages/systemManage/warningTimeSet"),
      },
      {
        path: "/SMSTemplate",
        name: `SMSTemplate`,
        meta: {
          ...meta,
          title: "短信模板",
          closable: true,
        },
        component: () =>
          import("@/pages/systemManage/warningTimeSet/SMSTemplate"),
      },
      // {
      //   path: "/pageTest",
      //   name: `pageTest`,
      //   meta: {
      //     ...meta,
      //     title: "预警时间设置",
      //     closable: true,
      //   },
      //   component: () => import("@/pages/pageTest/index"),
      // },
    ],
  },
  {
    path: "/logManage",
    name: `logManage`,
    meta: {
      ...meta,
      title: "日志管理",
      closable: true,
    },
    component: BasicLayout,
    children: [
      {
        path: "/loginLog",
        name: `loginLog`,
        meta: {
          ...meta,
          title: "登录日志",
          closable: true,
        },
        component: () => import("@/pages/logManage/loginLog"),
      },
      {
        path: "/userOperate",
        name: `userOperate`,
        meta: {
          ...meta,
          title: "用户操作日志",
          closable: true,
        },
        component: () => import("@/pages/logManage/userOperate"),
      },
      {
        path: "/systemExceptionLog",
        name: `systemExceptionLog`,
        meta: {
          ...meta,
          title: "系统异常日志",
          closable: true,
        },
        component: () => import("@/pages/logManage/systemExceptionLog"),
      },
      {
        path: "/systemAccessLog",
        name: `systemAccessLog`,
        meta: {
          ...meta,
          title: "系统访问日志",
          closable: true,
        },
        component: () => import("@/pages/logManage/systemAccessLog"),
      },
    ],
  },
];

export default routes
